$(document).ready(function () {
    /*    var code=$(".codemirror-textarea")[0];
    var editor=CodeMirror.fromTextArea(code,{
        lineNumbers:true,
        matchBrackets: true,
        mode: "text/x-c++src"
    });*/

    var editor1 = CodeMirror.fromTextArea(document.getElementById("code"), {
        lineNumbers: true,
        mode: "text/x-java",
        matchBrackets: true,
        indentUnit: 4,
        indentWithTabs: true,
        enterMode: "keep",
        tabMode: "shift",

    });
    var editor2 = CodeMirror.fromTextArea(document.getElementById("code"), {
        lineNumbers: true,
        mode: "text/x-java",
        matchBrackets: true,
        indentUnit: 4,
        indentWithTabs: true,
        enterMode: "keep",
        tabMode: "shift",
    });

    editor1.setSize('auto','300px');
    editor2.setSize('auto','300px');
})
